package com.lagou.service.impl;

import com.lagou.api.service.IpService;
import org.apache.dubbo.config.annotation.Service;
import org.apache.dubbo.rpc.RpcContext;
import org.springframework.stereotype.Component;

@Service
@Component
public class IpServiceimpl implements IpService {
    @Override
    public String service(String name) {
        System.out.println("服务端B被调用成功,请求的ip地址是:"+ RpcContext.getContext().getAttachment("clientIp"));

        return "服务端B调用成功,传入参数为:"+name;
    }
}
